package com.zhongyou.bean;

import java.io.Serializable;

public class CustomException extends RuntimeException implements Serializable{
	private int errcode;

	public int getErrcode() {
		return errcode;
	}

	public void setErrcode(int errcode) {
		this.errcode = errcode;
	}

	public CustomException(int errcode, String message) {
		super(message);
		this.errcode = errcode;
	}

	public CustomException(String message) {
		this(1, message);
	}

	public static CustomException create(int errcode, String message) {
		return new CustomException(errcode, message);
	}

	public static CustomException create(String message) {
		return new CustomException(1, message);
	}
}
